package com.taobao.floatmap.web.module.screen;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.alibaba.citrus.turbine.dataresolver.Param;

public class NoTemplateTest {
	
	@Autowired
	private HttpServletResponse response;
	 
	public void execute(@Param("param") long param) throws Exception {
		
		responseResult("param is : " + param);
		
	}
	
	private void responseResult(String result) throws IOException {
		PrintWriter writer = response.getWriter();
		writer.write(result);
		writer.flush();
		writer.close();
	}
	
//	 public static void responseJson(Object obj, HttpServletResponse response) {
//        PrintWriter writer = null;
//        String jsonResult = "";
//        try {
//            response.setContentType("text/html;charset=UTF-8");
//            response.setCharacterEncoding("UTF-8");
//            jsonResult = net.sf.json.JSONArray.fromObject(obj).toString();
//            writer = response.getWriter();
//            writer.println(jsonResult);
//        } catch (IOException e) {
//            
//        } finally {
//            writer.flush();
//            writer.close();
//        }
//    }

	
}
